
import { defineAmisPlugin, getInputTpl } from '../../base/util';
import ApproveCount, { type IProps } from './fc';

export default defineAmisPlugin<IProps>(({ amisEditor }) => {
  const { getSchemaTpl } = amisEditor;

    return {
        component: ApproveCount,
        options: {
            type: 'portal-approve-count',
            name: '审批汇总',
            icon: 'SlidersOutlined',
            description: '审批汇总',
            panelTitle: '审批汇总面板',
            scaffold: {
                title: '审批汇总'
            },
            panelTabs: [
                {
                    title: '常规',
                    body: [
                        getSchemaTpl('collapseGroup', [
                            {
                                title: '基本',
                                body: [
                                    getInputTpl('title', { label: '标题' })
                                ]
                            }
                        ])
                    ]
                },
                {
                    title: '外观',
                    body: [
                        getSchemaTpl('collapseGroup', [
                            ...getSchemaTpl('theme:common', { styleName: 'style' })
                        ])
                    ]
                }
            ]
        }
    };
});
